A charging circuit for a battery, such as a lithium ion battery or the like, is used as one function of a power management IC installed in a mobile device. Recently, in particular, there have been indications of dangers due to explosion or temperature increase in batteries with regard to charging operations. Furthermore, there is a demand for a function for charging a battery rapidly in a short time. From this viewpoint, it is required that the charging circuit and the power management IC that monitors the charging circuit strictly monitor and control states (attachment/detachment, voltage, current, temperature) of the battery and AC adapter that is a charging source.
For the charging circuit of a portable device, a circuit of an analog circuit unit is provided that monitors terminal voltage of a charging adaptor, for example, and detects whether the charging adaptor is attached or detached. If a detection signal sent from this analog circuit unit to a digital circuit unit is processed by the digital circuit unit and the adaptor is connected anew, notification is given that the adaptor is connected on a host side such as another chip or CPU, by outputting an interrupt signal or the like. However, output of the detection signal from the analog circuit unit is unstable in the vicinity of a detection threshold of the signal, and a signal in which a high level and a low level are frequently repeated is outputted to the digital circuit unit at this time. It is difficult to predict in advance a change in level of the signal outputted from this analog circuit unit.
Furthermore, a noise reduction circuit that reduces noise of an input signal is being used conventionally in a digital circuit. The noise reduction circuit of the digital circuit is configured by a multi-bit shift register that operates with a certain constant frequency clock, and generally reduces noise by a unanimous or majority decision of respective stages of the shift register.
Patent Document 1 describes a noise reduction circuit which, in order than circuit size does not increase even when accuracy of noise reduction is raised, uses an up/down counter that operates in synchronization with a clock instead of a shift register, and makes a majority decision as to whether or not the up/down counter has reached a prescribed upper limit or lower limit.    [Patent Document 1]    JP Patent Kokai Publication No. JP-A-4-330820